import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import edu.upenn.seas.peerreview._
import edu.upenn.seas.peerreview.{Id, Sink, Source}
import edu.upenn.seas.peerreview.pr._
import edu.upenn.seas.peerreview.pr.PRMessages._




class LogSuite extends FunSuite with ShouldMatchers {
  
/*  class BasicSM(transport: Pipe) extends GenericPipe(transport) {
    type M = Pipe.Mesg
    def handle(from: Id, msg: Pipe.Mesg) {
      msg match {
  case "Hi" => send(from, "How are you?")
  case "How are you?" => send(from, "Go away")
  case _ =>
      }
    }
  }

  test("log entries all end up in the correct place in the right order") {
    val log = new Log()
    val sender : Id = new Object with Id {
      override def toString = "testID1"
    }
    val receiver : Id = new Object with Id {
      override def toString = "testID2"
    }
    val x : Message = StringMessage("hey")
    val y : Message = StringMessage("hey 2")

    log.addSent(receiver, x)
    log.addRecv(sender, y)
    log.log.length should equal(2)
    log.log.dequeue should equal(new LOG_SEND(x, receiver))
    log.log.dequeue should equal(new LOG_RECV(y, sender))
  }*/

  test("very trivial auditing works") {
    
  }
}
